<script setup>
import { ref } from "vue";
import {
  HomeFilled,
  Histogram,
  HelpFilled,
  UserFilled,
} from "@element-plus/icons-vue";

const props = defineProps({
  population: {
    type: Number,
    default: 0,
  },
  pressures: {
    type: Number,
    default: 0,
  },
  sources: {
    type: Number,
    default: 0,
  },
  foulFactories: {
    type: Number,
    default: 0,
  },
});
</script>

<template>
  <div id="container">
    <div class="item">
      <el-icon><UserFilled /></el-icon>
      <span>人口：{{props.population}}</span>
    </div>
    <div class="item">
      <el-icon><HelpFilled /></el-icon>
      <span>水源井：{{props.sources}}</span>
    </div>
    <div class="item">
      <el-icon><HomeFilled /></el-icon>
      <span>水厂：{{props.foulFactories}}</span>
    </div>
    <div class="item">
      <el-icon><Histogram /></el-icon>
      <span>测压点：{{props.pressures}}</span>
    </div>
  </div>
</template>

<style lang="scss" scoped>
#container {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: row;
  // flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  padding: 2px;
  .item {
    width: 42%;
    height: 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .el-icon {
      font-size: 30px;
      color: #10fafe;
    }
    span {
      color: #10fafe;
    }
  }
}
</style>